<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>管理部门</title>
    <style type="text/css">
        table {border-collapse: collapse; font-size: 14px; width: 80%; margin: auto;}
        table, th, td {border: 1px solid darkslategray;padding: 10px}
    </style>
</head>
<body>
<div style="text-align: center">
    <a th:href="@{/user/findAll}">返回用户主页</a>
    <span style="color: darkslategray; font-size: 30px">管理部门</span>
    <a th:href="@{/emp/toAdd}" style="color: chocolate;font-size: larger">添加部门</a>
    <hr/>
    <table class="list">
        <tr>
            <td>部门名称</td>
            <td>部门建立时间</td>
            <td>操作</td>
        </tr>
        <tr th:each="emp : ${empList}">
            <td th:text="${emp.ename}"></td>
            <td th:text="${#dates.format(emp.createTime,'yyyy-MM-dd')}"></td>
            <td>
                <a th:href="@{/emp/toUpdate(eid=${emp.eid})}">修改</a>
                <a th:href="@{/emp/deleteByEid(eid=${emp.eid})}">删除</a>
            </td>
        </tr>
    </table>
</div>
</body>
</html>